package com.lc.app.androidfirst.userdefine.view;

import android.app.TabActivity;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TabHost;

import com.lc.app.androidfirst.R;

public class TabHostActivity extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            TabHost tabHost = getTabHost();
            LayoutInflater.from(this).inflate(R.layout.activity_tab_host,tabHost.getTabContentView(),true);
            tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("通讯录").setContent(R.id.tab1));
            tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("已接电话").setContent(R.id.tab2));
            tabHost.addTab(tabHost.newTabSpec("tab3").setIndicator("未接电话").setContent(R.id.tab3));

        }

}
